<template>
  <div class="g-header">
    <div class="g-header-left">
      <div class="g-header-title">hj-ui</div>
    </div>
    <div class="g-header-right">
      <div class="g-menu">
        <ul>
          <li v-for="item in itemList" :key="item.id">
            <router-link :to="item.link">{{item.label}}</router-link>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
import { ref } from 'vue'

export default {
  name:'Header',
  setup() {
    const itemList = ref([
        {
          label: '首页',
          link: '/'
        },
        {
          label: '使用说明',
          link: '/introduce'
        }
      ])
    return {
      itemList
    }
  }
}
</script>

<style lang="less" scoped>
  .g-header{
    width: 100%;
    height: 80px;
    padding: 0 20px;
    box-sizing: border-box;
    background: #eeeeee;
    box-shadow: tomato;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .g-header-left{
      .g-header-title{
        font-size: 20px;
        font-weight: bold;
      }
    }
    .g-header-right {
      .g-menu {
        ul {
          li {
            display: inline-block;
            padding-right: 20px;
          }
        }
      }
    }
  }
</style>